<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tinyOS: tFlagGroup.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">tinyOS
   &#160;<span id="projectnumber">v1.00</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('t_flag_group_8c_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">tFlagGroup.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="t_flag_group_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="t_flag_group_8h.html">tFlagGroup.h</a>&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="tiny_o_s_8h.html">tinyOS.h</a>&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#if !defined(TINYOS_ENABLE_FLAGGROUP) || TINYOS_ENABLE_FLAGGROUP == 1</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga00911071fa217a74d382bb498e95ca84">   24</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga00911071fa217a74d382bb498e95ca84">tFlagGroupInit</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, uint32_t flags) {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga5ca43de9442770133c4c2ac38e696049">tEventInit</a>(&amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>, <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gga38c1e3a16130027049cb697b78b5d11ca6c826bc2bb6b4a87108c230b6344969a">tEventTypeFlagGroup</a>);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> = flags;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;}</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">static</span> uint32_t tFlagGroupCheckAndConsume (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, uint32_t type, uint32_t *flags) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    uint32_t srcFlags = *flags;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    uint32_t isSet = type &amp; <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gaa66718734018378b3f76355bf298a976">TFLAGGROUP_SET</a>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    uint32_t isAll = type &amp; <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga227ba01b2b98ee12e778132a9383c520">TFLAGGROUP_ALL</a>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    uint32_t isConsume = type &amp; <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga61d98ba7f788d95fa5fcc52dfe3a7b4b">TFLAGGROUP_CONSUME</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="comment">// 有哪些类型的标志位出现</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="comment">// flagGroup-&gt;flags &amp; flags：计算出哪些位为1</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="comment">// ~flagGroup-&gt;flags &amp; flags:计算出哪位为0</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    uint32_t calcFlag = isSet ? (flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> &amp; srcFlags) : (~flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> &amp; srcFlags);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="comment">// 所有标志位出现, 或者做任意标志位出现，满足条件</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">if</span> (((isAll != 0) &amp;&amp; (calcFlag == srcFlags)) || ((isAll == 0) &amp;&amp; (calcFlag != 0))) {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="comment">// 是否消耗掉标志位</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="keywordflow">if</span> (isConsume) {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <span class="keywordflow">if</span> (isSet) {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                <span class="comment">// 清除为1的标志位，变成0</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> &amp;= ~srcFlags;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <span class="comment">// 清除为0的标志位，变成1</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> |= srcFlags;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            }</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        *flags = calcFlag;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc">tErrorNoError</a>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    *flags = calcFlag;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aa255993b8e7a6ec085f545b2cb4b0e161">tErrorResourceUnavaliable</a>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gad897d153498b3c0ad698e1ac30fbd947">   78</a></span>&#160;uint32_t <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gad897d153498b3c0ad698e1ac30fbd947">tFlagGroupWait</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, uint32_t waitType, uint32_t requestFlag,</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                         uint32_t *resultFlag, uint32_t waitTicks) {</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    uint32_t result;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    uint32_t flags = requestFlag;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    uint32_t status = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a>();</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    result = tFlagGroupCheckAndConsume(flagGroup, waitType, &amp;flags);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">if</span> (result != <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc">tErrorNoError</a>) {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="comment">// 如果事件标志不满足条件，则插入到等待队列中</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a>-&gt;<a class="code" href="struct__t_task.html#a35ba8bba537f36efd05f084a5531825a">waitFlagsType</a> = waitType;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a>-&gt;<a class="code" href="struct__t_task.html#af713ddc7d68fde45ace722a554f41918">eventFlags</a> = requestFlag;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga0bbda829b0d83072138caad66f98899a">tEventWait</a>(&amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>, <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a>, (<span class="keywordtype">void</span> *) 0, <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gga38c1e3a16130027049cb697b78b5d11ca6c826bc2bb6b4a87108c230b6344969a">tEventTypeFlagGroup</a>, waitTicks);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="comment">// 再执行一次事件调度，以便于切换到其它任务</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gaeb48f2b93febc962f23d9a6a72db9d8e">tTaskSched</a>();</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        *resultFlag = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a>-&gt;<a class="code" href="struct__t_task.html#af713ddc7d68fde45ace722a554f41918">eventFlags</a>;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        result = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a>-&gt;<a class="code" href="struct__t_task.html#a37707d87e42a484588393e5b3683ffbb">waitEventResult</a>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        *resultFlag = flags;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;}</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga8bd5ce7dc483b4a57bb2c5212d5f00c8">  114</a></span>&#160;uint32_t <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga8bd5ce7dc483b4a57bb2c5212d5f00c8">tFlagGroupNoWaitGet</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, uint32_t waitType, uint32_t requestFlag, uint32_t *resultFlag) {</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    uint32_t flags = requestFlag;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    uint32_t status = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a>();</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    uint32_t result = tFlagGroupCheckAndConsume(flagGroup, waitType, &amp;flags);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    *resultFlag = flags;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">return</span> status;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gab7797f8897babeef894dd3d2e90ccf8c">  131</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gab7797f8897babeef894dd3d2e90ccf8c">tFlagGroupNotify</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, uint8_t isSet, uint32_t flags) {</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="struct__t_list.html">tList</a> *waitList;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="struct__t_node.html">tNode</a> *node;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <a class="code" href="struct__t_node.html">tNode</a> *nextNode;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    uint8_t sched = 0;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    uint32_t status = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a>();</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">if</span> (isSet) {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> |= flags;     <span class="comment">// 置1事件</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a> &amp;= ~flags;    <span class="comment">// 清0事件</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="comment">// 遍历所有的等待任务, 获取满足条件的任务，加入到待移除列表中</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    waitList = &amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>.<a class="code" href="struct__t_event.html#a8e54a36f1038a12d9206c6ed20fab2a2">waitList</a>;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keywordflow">for</span> (node = waitList-&gt;<a class="code" href="struct__t_list.html#a6e52b98a705384bda92a389d838065b3">headNode</a>.<a class="code" href="struct__t_node.html#a69448376e4bffe728c05e9279a7d94d6">nextNode</a>; node != &amp;(waitList-&gt;<a class="code" href="struct__t_list.html#a6e52b98a705384bda92a389d838065b3">headNode</a>); node = nextNode) {</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        uint32_t result;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <a class="code" href="struct__t_task.html">tTask</a> *task = <a class="code" href="group___xE5_x8F_x8C_xE5_x90_x91_xE9_x93_xBE_xE8_xA1_xA8.html#ga5a79804168bfcc4553dcf0a57d22724d">tNodeParent</a>(node, <a class="code" href="struct__t_task.html">tTask</a>, linkNode);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        uint32_t flags = task-&gt;<a class="code" href="struct__t_task.html#af713ddc7d68fde45ace722a554f41918">eventFlags</a>;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        nextNode = node-&gt;<a class="code" href="struct__t_node.html#a69448376e4bffe728c05e9279a7d94d6">nextNode</a>;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="comment">// 检查标志</span></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        result = tFlagGroupCheckAndConsume(flagGroup, task-&gt;<a class="code" href="struct__t_task.html#a35ba8bba537f36efd05f084a5531825a">waitFlagsType</a>, &amp;flags);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">if</span> (result == <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc">tErrorNoError</a>) {</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="comment">// 唤醒任务</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            task-&gt;<a class="code" href="struct__t_task.html#af713ddc7d68fde45ace722a554f41918">eventFlags</a> = flags;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gaf035c08c00e607bf3019020ee09bf3c8">tEventWakeUpTask</a>(&amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>, task, (<span class="keywordtype">void</span> *) 0, <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc">tErrorNoError</a>);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            sched = 1;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="comment">// 如果有任务就绪，则执行一次调度</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">if</span> (sched) {</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gaeb48f2b93febc962f23d9a6a72db9d8e">tTaskSched</a>();</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    }</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;}</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga47a4f2555b2ea01ffacb722a802fef9a">  176</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga47a4f2555b2ea01ffacb722a802fef9a">tFlagGroupGetInfo</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup, <a class="code" href="struct__t_flag_group_info.html">tFlagGroupInfo</a> *info) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    uint32_t status = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a>();</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="comment">// 拷贝需要的信息</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    info-&gt;<a class="code" href="struct__t_flag_group_info.html#a773b39d480759f67926cb18ae2219281">flags</a> = flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">flags</a>;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    info-&gt;<a class="code" href="struct__t_flag_group_info.html#a80462c64b9184115aa568f08227f7f4a">taskCount</a> = <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga312cd12071f2d18172b4020079af49a2">tEventWaitCount</a>(&amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga2cccf23bbc1983be59ae880671ff3c8f">  191</a></span>&#160;uint32_t <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga2cccf23bbc1983be59ae880671ff3c8f">tFlagGroupDestroy</a> (<a class="code" href="struct__t_flag_group.html">tFlagGroup</a> *flagGroup) {</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    uint32_t status = <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a>();</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="comment">// 清空事件控制块中的任务</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    uint32_t count = <a class="code" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gace850c06cc2fc2f07296e1eb4552030a">tEventRemoveAll</a>(&amp;flagGroup-&gt;<a class="code" href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">event</a>, (<span class="keywordtype">void</span> *) 0, <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aa6c274bf418a43d0cf80e68161aad9d8e">tErrorDel</a>);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a>(status);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="comment">// 清空过程中可能有任务就绪，执行一次调度</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keywordflow">if</span> (count &gt; 0) {</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <a class="code" href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gaeb48f2b93febc962f23d9a6a72db9d8e">tTaskSched</a>();</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    }</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">return</span> count;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;}</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="preprocessor">#endif // TINYOS_ENABLE_FLAGGROUP</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="ttc" id="struct__t_flag_group_info_html_a773b39d480759f67926cb18ae2219281"><div class="ttname"><a href="struct__t_flag_group_info.html#a773b39d480759f67926cb18ae2219281">_tFlagGroupInfo::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00031">tFlagGroup.h:31</a></div></div>
<div class="ttc" id="struct__t_flag_group_html"><div class="ttname"><a href="struct__t_flag_group.html">_tFlagGroup</a></div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00024">tFlagGroup.h:24</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga00911071fa217a74d382bb498e95ca84"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga00911071fa217a74d382bb498e95ca84">tFlagGroupInit</a></div><div class="ttdeci">void tFlagGroupInit(tFlagGroup *flagGroup, uint32_t flags)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00024">tFlagGroup.c:24</a></div></div>
<div class="ttc" id="struct__t_task_html"><div class="ttname"><a href="struct__t_task.html">_tTask</a></div><div class="ttdef"><b>Definition:</b> <a href="t_task_8h_source.html#l00031">tTask.h:31</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga61d98ba7f788d95fa5fcc52dfe3a7b4b"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga61d98ba7f788d95fa5fcc52dfe3a7b4b">TFLAGGROUP_CONSUME</a></div><div class="ttdeci">#define TFLAGGROUP_CONSUME</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00045">tFlagGroup.h:45</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_gga38c1e3a16130027049cb697b78b5d11ca6c826bc2bb6b4a87108c230b6344969a"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gga38c1e3a16130027049cb697b78b5d11ca6c826bc2bb6b4a87108c230b6344969a">tEventTypeFlagGroup</a></div><div class="ttdef"><b>Definition:</b> <a href="t_event_8h_source.html#l00027">tEvent.h:27</a></div></div>
<div class="ttc" id="struct__t_flag_group_html_a8b516ab130f86e4b15ca025c98c3dc53"><div class="ttname"><a href="struct__t_flag_group.html#a8b516ab130f86e4b15ca025c98c3dc53">_tFlagGroup::event</a></div><div class="ttdeci">tEvent event</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00025">tFlagGroup.h:25</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga8bd5ce7dc483b4a57bb2c5212d5f00c8"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga8bd5ce7dc483b4a57bb2c5212d5f00c8">tFlagGroupNoWaitGet</a></div><div class="ttdeci">uint32_t tFlagGroupNoWaitGet(tFlagGroup *flagGroup, uint32_t waitType, uint32_t requestFlag, uint32_t *resultFlag)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00114">tFlagGroup.c:114</a></div></div>
<div class="ttc" id="struct__t_flag_group_info_html"><div class="ttname"><a href="struct__t_flag_group_info.html">_tFlagGroupInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00030">tFlagGroup.h:30</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_gace850c06cc2fc2f07296e1eb4552030a"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gace850c06cc2fc2f07296e1eb4552030a">tEventRemoveAll</a></div><div class="ttdeci">uint32_t tEventRemoveAll(tEvent *event, void *msg, uint32_t result)</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8c_source.html#l00163">tEvent.c:163</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_gab4d6c802c474b9071f48312bed3dec74"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gab4d6c802c474b9071f48312bed3dec74">tTaskEnterCritical</a></div><div class="ttdeci">tTaskCritical_t tTaskEnterCritical(void)</div><div class="ttdef"><b>Definition:</b> <a href="t_switch_8c_source.html#l00036">tSwitch.c:36</a></div></div>
<div class="ttc" id="group___xE5_x8F_x8C_xE5_x90_x91_xE9_x93_xBE_xE8_xA1_xA8_html_ga5a79804168bfcc4553dcf0a57d22724d"><div class="ttname"><a href="group___xE5_x8F_x8C_xE5_x90_x91_xE9_x93_xBE_xE8_xA1_xA8.html#ga5a79804168bfcc4553dcf0a57d22724d">tNodeParent</a></div><div class="ttdeci">#define tNodeParent(node, parent, name)</div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00048">tLib.h:48</a></div></div>
<div class="ttc" id="struct__t_event_html_a8e54a36f1038a12d9206c6ed20fab2a2"><div class="ttname"><a href="struct__t_event.html#a8e54a36f1038a12d9206c6ed20fab2a2">_tEvent::waitList</a></div><div class="ttdeci">tList waitList</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8h_source.html#l00034">tEvent.h:34</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_gaa66718734018378b3f76355bf298a976"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gaa66718734018378b3f76355bf298a976">TFLAGGROUP_SET</a></div><div class="ttdeci">#define TFLAGGROUP_SET</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00036">tFlagGroup.h:36</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_ga312cd12071f2d18172b4020079af49a2"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga312cd12071f2d18172b4020079af49a2">tEventWaitCount</a></div><div class="ttdeci">uint32_t tEventWaitCount(tEvent *event)</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8c_source.html#l00206">tEvent.c:206</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_gaeb48f2b93febc962f23d9a6a72db9d8e"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gaeb48f2b93febc962f23d9a6a72db9d8e">tTaskSched</a></div><div class="ttdeci">void tTaskSched(void)</div><div class="ttdoc">任务调度接口。通过它来选择下一个具体的任务，然后切换至该任务运行。 </div><div class="ttdef"><b>Definition:</b> <a href="t_core_8c_source.html#l00126">tCore.c:126</a></div></div>
<div class="ttc" id="struct__t_node_html"><div class="ttname"><a href="struct__t_node.html">_tNode</a></div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00035">tLib.h:35</a></div></div>
<div class="ttc" id="t_flag_group_8h_html"><div class="ttname"><a href="t_flag_group_8h.html">tFlagGroup.h</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_gga79eea102ac8c9dc0bcce5f8c63ccc55aa6c274bf418a43d0cf80e68161aad9d8e"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aa6c274bf418a43d0cf80e68161aad9d8e">tErrorDel</a></div><div class="ttdef"><b>Definition:</b> <a href="tiny_o_s_8h_source.html#l00037">tinyOS.h:37</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_gab7797f8897babeef894dd3d2e90ccf8c"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gab7797f8897babeef894dd3d2e90ccf8c">tFlagGroupNotify</a></div><div class="ttdeci">void tFlagGroupNotify(tFlagGroup *flagGroup, uint8_t isSet, uint32_t flags)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00131">tFlagGroup.c:131</a></div></div>
<div class="ttc" id="tiny_o_s_8h_html"><div class="ttname"><a href="tiny_o_s_8h.html">tinyOS.h</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_ga5ca43de9442770133c4c2ac38e696049"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga5ca43de9442770133c4c2ac38e696049">tEventInit</a></div><div class="ttdeci">void tEventInit(tEvent *event, tEventType type)</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8c_source.html#l00021">tEvent.c:21</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_gga79eea102ac8c9dc0bcce5f8c63ccc55aa255993b8e7a6ec085f545b2cb4b0e161"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aa255993b8e7a6ec085f545b2cb4b0e161">tErrorResourceUnavaliable</a></div><div class="ttdef"><b>Definition:</b> <a href="tiny_o_s_8h_source.html#l00036">tinyOS.h:36</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga2cccf23bbc1983be59ae880671ff3c8f"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga2cccf23bbc1983be59ae880671ff3c8f">tFlagGroupDestroy</a></div><div class="ttdeci">uint32_t tFlagGroupDestroy(tFlagGroup *flagGroup)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00191">tFlagGroup.c:191</a></div></div>
<div class="ttc" id="struct__t_task_html_af713ddc7d68fde45ace722a554f41918"><div class="ttname"><a href="struct__t_task.html#af713ddc7d68fde45ace722a554f41918">_tTask::eventFlags</a></div><div class="ttdeci">uint32_t eventFlags</div><div class="ttdef"><b>Definition:</b> <a href="t_task_8h_source.html#l00061">tTask.h:61</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_ga21b4efbc4cb710d7d0e71678d2b13e53"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga21b4efbc4cb710d7d0e71678d2b13e53">tTaskExitCritical</a></div><div class="ttdeci">void tTaskExitCritical(tTaskCritical_t status)</div><div class="ttdef"><b>Definition:</b> <a href="t_switch_8c_source.html#l00047">tSwitch.c:47</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_ga0bbda829b0d83072138caad66f98899a"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#ga0bbda829b0d83072138caad66f98899a">tEventWait</a></div><div class="ttdeci">void tEventWait(tEvent *event, tTask *task, void *msg, uint32_t state, uint32_t timeout)</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8c_source.html#l00035">tEvent.c:35</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga47a4f2555b2ea01ffacb722a802fef9a"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga47a4f2555b2ea01ffacb722a802fef9a">tFlagGroupGetInfo</a></div><div class="ttdeci">void tFlagGroupGetInfo(tFlagGroup *flagGroup, tFlagGroupInfo *info)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00176">tFlagGroup.c:176</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97_html_gaf035c08c00e607bf3019020ee09bf3c8"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_x8E_xA7_xE5_x88_xB6_xE5_x9D_x97.html#gaf035c08c00e607bf3019020ee09bf3c8">tEventWakeUpTask</a></div><div class="ttdeci">void tEventWakeUpTask(tEvent *event, tTask *task, void *msg, uint32_t result)</div><div class="ttdef"><b>Definition:</b> <a href="t_event_8c_source.html#l00109">tEvent.c:109</a></div></div>
<div class="ttc" id="struct__t_task_html_a35ba8bba537f36efd05f084a5531825a"><div class="ttname"><a href="struct__t_task.html#a35ba8bba537f36efd05f084a5531825a">_tTask::waitFlagsType</a></div><div class="ttdeci">uint32_t waitFlagsType</div><div class="ttdef"><b>Definition:</b> <a href="t_task_8h_source.html#l00060">tTask.h:60</a></div></div>
<div class="ttc" id="struct__t_node_html_a69448376e4bffe728c05e9279a7d94d6"><div class="ttname"><a href="struct__t_node.html#a69448376e4bffe728c05e9279a7d94d6">_tNode::nextNode</a></div><div class="ttdeci">struct _tNode * nextNode</div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00037">tLib.h:37</a></div></div>
<div class="ttc" id="struct__t_flag_group_info_html_a80462c64b9184115aa568f08227f7f4a"><div class="ttname"><a href="struct__t_flag_group_info.html#a80462c64b9184115aa568f08227f7f4a">_tFlagGroupInfo::taskCount</a></div><div class="ttdeci">uint32_t taskCount</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00032">tFlagGroup.h:32</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#gga79eea102ac8c9dc0bcce5f8c63ccc55aab8add26d1e8bad7b6abb3c0c453fcabc">tErrorNoError</a></div><div class="ttdef"><b>Definition:</b> <a href="tiny_o_s_8h_source.html#l00034">tinyOS.h:34</a></div></div>
<div class="ttc" id="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83_html_ga6f232fb9d8361d1071e4f621468e0ee1"><div class="ttname"><a href="group___xE5_x86_x85_xE6_xA0_xB8_xE6_xA0_xB8_xE5_xBF_x83.html#ga6f232fb9d8361d1071e4f621468e0ee1">currentTask</a></div><div class="ttdeci">tTask * currentTask</div><div class="ttdoc">当前任务：记录当前是哪个任务正在运行 </div><div class="ttdef"><b>Definition:</b> <a href="t_core_8c_source.html#l00017">tCore.c:17</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_ga227ba01b2b98ee12e778132a9383c520"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#ga227ba01b2b98ee12e778132a9383c520">TFLAGGROUP_ALL</a></div><div class="ttdeci">#define TFLAGGROUP_ALL</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00038">tFlagGroup.h:38</a></div></div>
<div class="ttc" id="struct__t_list_html_a6e52b98a705384bda92a389d838065b3"><div class="ttname"><a href="struct__t_list.html#a6e52b98a705384bda92a389d838065b3">_tList::headNode</a></div><div class="ttdeci">tNode headNode</div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00044">tLib.h:44</a></div></div>
<div class="ttc" id="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84_html_gad897d153498b3c0ad698e1ac30fbd947"><div class="ttname"><a href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE6_xA0_x87_xE5_xBF_x97_xE7_xBB_x84.html#gad897d153498b3c0ad698e1ac30fbd947">tFlagGroupWait</a></div><div class="ttdeci">uint32_t tFlagGroupWait(tFlagGroup *flagGroup, uint32_t waitType, uint32_t requestFlag, uint32_t *resultFlag, uint32_t waitTicks)</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8c_source.html#l00078">tFlagGroup.c:78</a></div></div>
<div class="ttc" id="struct__t_flag_group_html_a773b39d480759f67926cb18ae2219281"><div class="ttname"><a href="struct__t_flag_group.html#a773b39d480759f67926cb18ae2219281">_tFlagGroup::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> <a href="t_flag_group_8h_source.html#l00026">tFlagGroup.h:26</a></div></div>
<div class="ttc" id="struct__t_list_html"><div class="ttname"><a href="struct__t_list.html">_tList</a></div><div class="ttdef"><b>Definition:</b> <a href="t_lib_8h_source.html#l00043">tLib.h:43</a></div></div>
<div class="ttc" id="struct__t_task_html_a37707d87e42a484588393e5b3683ffbb"><div class="ttname"><a href="struct__t_task.html#a37707d87e42a484588393e5b3683ffbb">_tTask::waitEventResult</a></div><div class="ttdeci">uint32_t waitEventResult</div><div class="ttdef"><b>Definition:</b> <a href="t_task_8h_source.html#l00059">tTask.h:59</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="t_flag_group_8c.html">tFlagGroup.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
